import request from '../utils/request.js'

export const userLogin = (userObj)=>{ //登录
  return request.post('/login',userObj)
}

export const userReg = (userObj)=>{ //注册，分配账号
  return request.post('/users',userObj)
}

export const userUpdate = (objectId,userObj)=>{ //更新用户信息
  return request.put(`/users/${objectId}`,userObj)
}

export const rolePost = (roleObj)=>{ //新增角色
  return request.post('/classes/LearnRole',roleObj)
}

export const roleGet = ()=>{ //角色列表
  return request.get('/classes/LearnRole')
}